import request from '@/utils/request'

const headers = {
  'Content-Type': 'application/json'
}

export function getc2cTradlist(data) {
  return request({
    url: `/c2c/trad/list`,
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function getc2cOrderlist(data) {
  return request({
    url: '/c2c/order/list',
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function getc2cmerchantList(data) {
  return request({
    url: '/c2c/merchantList',
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function getc2cmerchantAdd(data) {
  return request({
    url: `/c2c/C2Cmerchant`,
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function getc2cmerchantDel(data) {
  return request({
    url: `/c2c/delmerchant`,
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function getc2cAppeal(data) {
  return request({
    url: `/c2c/appeal/${data.orderId}`,
    method: 'get',
    // data: JSON.stringify(data),
    headers
  })
}


export function getc2cotcList(data) {
  return request({
    url: '/c2c/ctoList',
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function getc2cotcAdd(data) {
  return request({
    url: '/c2c/otcadd',
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function getc2cotcUpdate(data) {
  return request({
    url: '/c2c/otcupdate',
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}

export function adoptAppeal(data) {
  return request({
    url: `/c2c/adoptAppeal`,
    method: 'post',
    data: JSON.stringify(data),
    headers
  })
}
